import 'package:flutter_test/flutter_test.dart';
import 'package:winner_scan_pluge/winner_scan_pluge.dart';
import 'package:winner_scan_pluge/winner_scan_pluge_platform_interface.dart';
import 'package:winner_scan_pluge/winner_scan_pluge_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockWinnerScanPlugePlatform
    with MockPlatformInterfaceMixin
    implements WinnerScanPlugePlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final WinnerScanPlugePlatform initialPlatform = WinnerScanPlugePlatform.instance;

  test('$MethodChannelWinnerScanPluge is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelWinnerScanPluge>());
  });

  test('getPlatformVersion', () async {
    WinnerScanPluge winnerScanPlugePlugin = WinnerScanPluge();
    MockWinnerScanPlugePlatform fakePlatform = MockWinnerScanPlugePlatform();
    WinnerScanPlugePlatform.instance = fakePlatform;

    expect(await winnerScanPlugePlugin.getPlatformVersion(), '42');
  });
}
